<!DOCTYPE html>
<%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<html>
<head>
<%@ include file="/pages/inc/header.jsp"%>
<title><%=systemTitle %></title>
</head>
<body class="report">
	<div id="doc">
		<%@ include file="/pages/common/pageheader.jsp"%>

		<div class="bd clearfix">
			<div id="leftColContainer">
				<div class="leftCol">
					<jsp:include page="/pages/common/pagemenu.jsp" flush="true">
						<jsp:param name="itemid" value="item2" />
						<jsp:param name="pageid" value="reshelf" />
					</jsp:include>
				</div>
			</div>
			<div id="mainContainer">
				<div class="contentCol">
					<form id="searchForm" action="render?pageid=reshelf" method="POST"></form>
					<form id="exportForm" action="render?pageid=reshelf&action=export" method="POST"></form>
					<input type="hidden" id="action_stats" value="reshelf">

					<div id="app-digest" class="mod">
						<div class="overview-header clearfix">
							<h2 style="margin-top: 5px;">
								玩具编号：&nbsp;&nbsp;<input type="text" id="condation" name="condation" value="" />&nbsp;
								<input type="button" id="btn" name="btn" onclick="search();" value="查询" />
							</h2>
						</div>
					</div>

					<!-- table begin -->
					<div id="reshelf_table" class="mod mod1 parent-table">
						<div class="mod-header radius">
							<h2>重新上架</h2>
						</div>
						<div id="data-load" class="mod-body ">
							<table width="100%" cellspacing="0" border="0" class="data-load ">
								<thead>
									<tr>
										<th>主题</th>
										<th>玩具编号</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody id="data-list">
								</tbody>
							</table>
							<div class="wait-load" style="display: none;">
								<img src="<%=contextPath%>/styles/images/ajax-loader.gif">
							</div>
						</div>
						<div class="mod-bottom clearfix" style="display: none;">
							<div class="fr pagination"></div>
						</div>
					</div>
					<!-- table end  -->

				</div>
			</div>

		</div>
	</div>
<div class="hiddenft"></div>

<%@ include file="/pages/inc/footer.jsp"%>
<script type="text/javascript">
	$(document).ready(function(){
		$.publish('rTable');
	});
	    
	function search(){
		$.publish('rTable');
	}

	 $("#condation").keydown(function(e){
		if(e.keyCode==13){
			search();
		}
	});
	 
	function reshelf(backid){
		$.post("<%=contextPath%>/render?pageid=reshelf&action=create", 
			{backid:backid},
				function(data){
					if(data.success){
						alert("确认上架成功！");
						$.publish('rPage');
					}else{
						alert("确认上架失败!");
					}
					console.log(data.time);
				}, "json"); 
	}    
</script>

</body>
</html>